{% extends 'common/panel.html' %}

{% block panel %}
{% load humanize %}
{% load analysis_extras %}

<h3>Net Primary Production</h3>

<div class='freetext'>
<p>
<table  style='width:430px' class='analysis_report_container'>
    <tbody>
        <tr class="grey">
            <td colspan='2'>
                <b>Average Terrestrial Net Primary Production</b> 
                <sup><a id="displayText" href="javascript:toggleDiv('npp_terr');">Learn More</a><sup>
                <div id="npp_terr" style="display: none">
                    <p>Terrestrial Net Primary Production (NPP) is defined as the measure of organic compound production from atmospheric 
                       carbon dioxide.
                       It is the rate at which all plants in an ecosystem produce net useful chemical energy.  
                    <p>NPP is measured in mass / area / time.  The following report uses a measure of grams of carbon per meter squared per year. 
                    <p><b>The average global terrestrial NPP is {{avg_terrestrial_npp}} g C/m<sup>2</sup>/year.</b>
                    <p>More information on the Terrestrial NPP dataset can be found <a href="http://sedac.ciesin.columbia.edu/es/hanpp.html" target="_blank">here</a>.
                    <p>NOTE:  Many significant land masses are not represented within this dataset, such absences are reported as
                       'No Data Available'.  
                </div>
            </td>
        </tr>
        <tr>
            <td colspan='2'>
                {% if terr_npp_avg == 0 %}
                    No Data Available
                {% else %}
                    {{terr_npp_avg|floatformat:0}} g C/m<sup>2</sup>/yr
                {% endif %}
            </td>
        </tr>
        <tr><td></td><td></td></tr>
        <tr><td></td><td></td></tr>
        <tr class="grey">
            <td colspan='2'>
                <b>Average Oceanic Net Primary Production</b> 
                <sup><a id="displayText" href="javascript:toggleDiv('npp_ocn');">Learn More</a><sup>
                <div id="npp_ocn" style="display: none">
                    <p>Oceanic Net Primary Production (NPP) is defined as the measure of organic compound production from aquatic
                       carbon dioxide.
                       It is the rate at which all plants in an ecosystem produce net useful chemical energy.  
                    <p>NPP is measured in mass / area / time.  The following report uses a measure of grams of carbon per meter squared per year. 
                    <p><b>The average global oceanic NPP is {{avg_oceanic_npp}} g C/m<sup>2</sup>/year with coastal areas tending higher than deep sea areas.</b>
                    <p>More information on the Oceanic NPP dataset can be found <a href="http://www.science.oregonstate.edu/ocean.productivity/index.php" target="_blank">here</a>.
                </div>
            </td>
        </tr>
        <tr>
            <td colspan='2'>
                {% if ocn_npp_avg == 0 %}
                    No Data Available
                {% else %}
                    {{ocn_npp_avg|floatformat:0}} g C/m<sup>2</sup>/yr
                {% endif %}
            </td>
        </tr>
        <tr><td></td><td></td></tr>
        <tr><td></td><td></td></tr>
    </tbody>
</table>
</div>

<h3>Land-Based Agicultural Characteristics</h3>
<div class='freetext'>
<p>
<table  style='width:430px' class='analysis_report_container'>
    <tbody>
        <tr class="grey">
            <td colspan='2'>
                <b>Proportion Suitable for Agriculture</b>
                <sup><a id="displayText" href="javascript:toggleDiv('agriculture');">Learn More</a><sup>
                <div id="agriculture" style="display: none">
                    <p>This value represents the proportion of the terrestrial area in the bioregion that is considered suitable for 
                       agriculture based on temperature and soil quality measurements.  
                    <p>The data was created by Ramnkutty, N., J.A. Foley, J. Norman, and K. McSweeney in 2001.  
                    <p>More information on the Agricultural Suitability dataset can be found <a href="http://www.sage.wisc.edu/atlas/maps.php?datasetid=19&includerelatedlinks=1&dataset=19" target="_blank">here</a>.
                    <p>NOTE:  Many significant land masses were not included within this dataset, such absences are reported as
                       'No Data Available'.  
                </div>
            </td>
        </tr>
        <tr>
            <td colspan='2'>
                {% if soil_suitability.0 == 0 %}
                    No Data Available
                {% else %}
                    {{soil_suitability.0|percentage:0}} 
                    <p>({{soil_suitability.1|floatformat:0|intcomma}} km<sup>2</sup> / {{soil_suitability.2|floatformat:0|intcomma}} mi<sup>2</sup>)
                {% endif %}
            </td>
        </tr>
        <tr><td></td><td></td></tr>
        <tr><td></td><td></td></tr>
        <tr class="grey">
            <td colspan='2'>
                <b>Proportion Equipped for Irrigation</b>
                <sup><a id="displayText" href="javascript:toggleDiv('irrigation');">Learn More</a><sup>
                <div id="irrigation" style="display: none">
                    <p>This value represents the proportion of the terrestrial area in the bioregion that is equipped for irrigation.
                    <p>Source: Stefan Siebert, Petra Doll, Sebastian Feick, Jippe Hoogeveen, and Karen Frenken (2007) 
                       Global Map of Irrigation Areas version 4.0.1 Johann Wolfgang, Goethe University, Frankfurt am Main, Germain / Food
                       and Agriculture Organization of the United Nations, Rome, Italy.  
                    <p>More information on the Irrigation dataset can be found <a href="http://www.fao.org/nr/water/aquastat/irrigationmap/index.stm" target="_blank">here</a>.
                </div>
            </td>
        </tr>
        <tr>
            <td colspan='2'>
                {% if equipped_for_irrigation.0 == 0 %}
                    No Data Available
                {% else %}
                    {{equipped_for_irrigation.0|percentage:1}}
                    <p>({{equipped_for_irrigation.1|floatformat:0|intcomma}} km<sup>2</sup> / {{equipped_for_irrigation.2|floatformat:0|intcomma}} mi<sup>2</sup>)
                {% endif %}
            </td>
        </tr>
        <tr><td></td><td></td></tr>
        <tr><td></td><td></td></tr>
    </tbody>
</table>
</div>

<h3>Ecological Regions</h3>
<div class='freetext'>
<p>
<table  style='width:430px' class='analysis_report_container'>
    <tbody>
        <tr class="grey">
            <td colspan='2'>
                <b>WWF Ecoregions</b>
                <sup><a id="displayText" href="javascript:toggleDiv('ecoregions');">Learn More</a><sup>
                <div id="ecoregions" style="display: none">
                    <p>World Wildlife Federation Terrestrial Ecoregions of the World.  
                    <p>More information on the WWF Ecoregions dataset can be found <a href="http://www.worldwildlife.org/science/ecoregions/item1267.html" target="_blank">here</a>.
                </div>
            </td>
        </tr>
        {% if not ecoregions.0 %}
        <tr>
            <td colspan='2'>None present</td>
        </tr>
        {% else %}
        {% for ecoregion in ecoregions %}
        <tr>
            <td colspan='2'>{{ecoregion.0}} ({{ecoregion.1|floatformat:0|intcomma}} km<sup>2</sup> / {{ecoregion.2|floatformat:0|intcomma}} mi<sup>2</sup>)</td>
        </tr>
        {% endfor %}
        {% endif %}
        <tr><td></td><td></td></tr>
        <tr><td></td><td></td></tr>
        <tr class="grey">
            <td colspan='2'>
                <b>Wild Regions</b>
                <sup><a id="displayText" href="javascript:toggleDiv('last_wild');">Learn More</a><sup>
                <div id="last_wild" style="display: none">
                    <p>This report represents the amount of the world's 10% least influenced areas. 
                    <p>More information on the Wild Regions dataset can be found <a href="http://sedac.ciesin.columbia.edu/wildareas/methods.jsp" target="_blank">here</a>.
                </div>
            </td>
        </tr>
        {% if not wild_regions.0 %}
        <tr>
            <td colspan='2'>None present</td>
        </tr>
        {% else %}
        {% for region in wild_regions %}
        <tr>
            <td colspan='2'>{{region.0}} ({{region.1|floatformat:0|intcomma}} km<sup>2</sup> / {{region.2|floatformat:0|intcomma}} mi<sup>2</sup>)</td>
        </tr>
        {% endfor %}
        {% endif %}
        <tr><td></td><td></td></tr>
        <tr><td></td><td></td></tr>
        <tr class="grey">
            <td colspan='2'>
                <b>Watersheds</b>
                <sup><a id="displayText" href="javascript:toggleDiv('watersheds');">Learn More</a><sup>
                <div id="watersheds" style="display: none">
                    <p>Watershed data (HydroSHEDS) has been developed by the Conservation Science Program of World Wildlife Fund (WWF), 
                       in partnership with the U.S. Geological Survey (USGS), the International Centre for Tropical Agriculture (CIAT), 
                       The Nature Conservancy (TNC), and the Center for Environmental Systems Research (CESR) of the University of Kassel, 
                       Germany. Major funding for this project was provided to WWF by JohnsonDiversey, Inc.
                    <p>More information on the Watersheds dataset can be found <a href="http://hydrosheds.cr.usgs.gov/overview.php" target="_blank">here</a>.
                    <p>NOTE:  Many significant land masses were not included within this dataset, we report on such absences with
                       'No Data Available'.  
                </div>
            </td>
        </tr>
        {% if watersheds.0 %}
            {% for watershed in watersheds %}
            <tr>
                <td colspan='2'>{{watershed.0}} ({{watershed.1|floatformat:0|intcomma}} km<sup>2</sup> / {{watershed.2|floatformat:0|intcomma}} mi<sup>2</sup>)</td>
            </tr>
            {% endfor %}
        {% else %}
            <tr>
                <td colspan='2'>No Data Available</td>
            </tr>
        {% endif %}
        <tr><td></td><td></td></tr>
        <tr><td></td><td></td></tr>
        <tr class="grey">
            <td colspan='2'>
                <b>WWF Marine Ecoregions</b>
                <sup><a id="displayText" href="javascript:toggleDiv('marine_regions');">Learn More</a><sup>
                <div id="marine_regions" style="display: none">
                    <p>World Wildlife Federation Marine Ecoregions of the World.  
                    <p>More information on the WWF Marine Ecoregions dataset can be found <a href="http://www.worldwildlife.org/science/ecoregions/marine/item1266.html" target="_blank">here</a>.
                </div>
            </td>
        </tr>
        {% if not marine_ecoregions.0 %}
        <tr>
            <td colspan='2'>None present</td>
        </tr>
        {% else %}
        {% for marineregion in marine_ecoregions %}
        <tr>
            <td colspan='2'>{{marineregion.0}} ({{marineregion.1|floatformat:0|intcomma}} km<sup>2</sup> / {{marineregion.2|floatformat:0|intcomma}} mi<sup>2</sup>)</td>
        </tr>
        {% endfor %}
        {% endif %}
        <tr><td></td><td></td></tr>
        <tr><td></td><td></td></tr>
    </tbody>
</table>
</div>
<p>

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script type="text/javascript">
function toggleDiv(divId) {
   $("#"+divId).toggle();
}
</script>

<style type="text/css">
h3 { font-weight: bold; }
</style>

{% endblock panel %}
